import java.util.Scanner;

public class Method {
    public static void main(String[] args) {

    }
    public static float maxfloat(float a, float b, float c) {
        float max = a > b ? a : b;
        return max > c ? max : c;
    }

    public static int maxint(int n, int k) {
        if (n > k) {
            return n;
        }else {
            return k;
        }
    }
    public static void main21(String[] args) {
        int ret1 = maxint(10, 100);
        float ret2 = maxfloat(11.1f, 22.2f, 33.3f);
        System.out.println(ret1);
        System.out.println(ret2);
    }

    public static int addint(int x, int y) {
        return x + y;
    }

    public static float addpoint(float n, float k) {
        float sum = n + k;
        return sum;
    }
    public static void main20(String[] args) {
        int ret1 = addint(3, 7);//整数加法
        float ret2 = addpoint(12.3f, 12.2f);//小数加法
        System.out.println(ret1);
        System.out.println(ret2);
    }
    public static int facadd(int num) {
        int sum = 0;//统计阶乘和
        for (int i = 1; i <= 5 ; i++) {
            int ret = 1;//计算阶乘
            for (int j = 1; j <= i ; j++) {
                ret *= j;
            }
            sum += ret;//累加阶乘和
        }
        return sum;
    }
    public static void main19(String[] args) {
        int ret = facadd(5);
        System.out.println(ret);
    }
    public static int fac(int num) {
        int sum = 1;//累计的和
        for (int i = 1; i <= 5 ; i++) {
            sum *= i;
        }
        return sum;
    }
    public static void main18(String[] args) {
        int ret = fac(5);//求5的阶乘
        System.out.println(ret);
    }
    public static void main17(String[] args) {
        Scanner input = new Scanner(System.in);
        while(input.hasNextInt()) {
            int age = input.nextInt();
            System.out.println("年龄：" + age);
        }
    }
    public static void main16(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个值：");
        int num = input.nextInt();
        System.out.println("数值是" + num);
    }
    public static void main15(String[] args) {
        System.out.println("abc");
        System.out.print("123");
        System.out.printf("%s","456");
    }
    public static void main14(String[] args) {
        int i = 1;
        do {
            System.out.print(i + " ");
            i++;
        } while(i <= 10);
    }
    public static void main13(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum += i;
        }
        System.out.println(sum);
    }
    public static void main12(String[] args) {
        int num = 10;
        for (int i = 0; i <= num ; i++) {
            if (i % 2 == 0) {
                System.out.println(i);
            }
        }
    }
    public static void main11(String[] args) {
        int num = 100;
        while (num <= 200) {
            if (num % 3 != 0) {
                num++; // 这里的 ++ 不要忘记! 否则会死循环.
                continue;
            }
            System.out.println("找到了 3 的倍数, 为:" + num);
            num++;
        }
    }
    public static void main10(String[] args) {
        int year = 1000;
        while(year <= 2000) {
            if ((year % 4 != 0 && year % 100 == 0)|| year % 400 == 0 ) {
                System.out.println(year);
                break;
            }
            year++;
        }
    }
    public static void main9(String[] args) {
        int i = 1;
        int sum = 0;//累加的和
        while(i <= 100) {
            sum += i;
            i++;
        }
        System.out.println(sum);
    }
    public static void main8(String[] args) {
        int i = 10;
        while(i >= 0) {
            System.out.print(1+" ");
            i--;
        }
    }
    public static void main7(String[] args) {
        int day = 1;
        switch(day) {
            case 1:
                System.out.println("星期一");
                break;
            case 2:
                System.out.println("星期二");
                break;
            case 3:
                System.out.println("星期三");
                break;
            case 4:
                System.out.println("星期四");
                break;
            case 5:
                System.out.println("星期五");
                break;
            case 6:
                System.out.println("星期六");
                break;
            case 7:
                System.out.println("星期日");
                break;
            default:
                System.out.println("输入有误");
                break;
        }
    }
    public static void main6(String[] args) {
        int i = 10;
        switch (1) {
            case 1:{
                System.out.println("1");
                break;
            }
        }
    }
    public static void main5(String[] args) {
        int n = 10;
        if (n == 20);{
            System.out.println("hehe");
        }
    }
    public static void main4(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入家人腿的长度");
        int people = input.nextInt();//输入
        if (people < 100) {
            System.out.println("小短腿");
        } else if (people > 100 && people <= 110) {
            System.out.println("短腿");
        } else if (people > 110 && people <= 120) {
            System.out.println("长腿");
        }else {
            System.out.println("大长腿");
        }
    }
    public static int max2(int n, int k) {
        if (n > k) {
            return n;
        }else {
            return k;
        }
    }
    public static int max3(int x, int y, int z) {
        int max = x > y ? x : y;//存放x或y,且为当前的最大值
        return max > z ? max : z;//返回的就是三个数的最大值
    }
    public static void Max(String[] args) {
        int ret1 = max2(10, 20);
        int ret2 = max3(100, 200, 300);
        System.out.println("n,k最大值:" + ret1);
        System.out.println("x,y,z最大值:" + ret2);
    }

    public static void main3(String[] args) {
        int score = 59;
        if (score >= 60) {
            System.out.println("奖励你一个offer");
        }
        else {
            System.out.println("给你一个大逼do");
        }
    }
    public static void main2(String[] args) {
        int num = 10;
        char ch = 'a';
        double sum = 12.5;
        System.out.println(num);
        System.out.println(sum);
        System.out.println(ch);
    }
    public static void main1(String[] args) {
        int num = 10;
        char ch = 'a';
        double sum = 12.5;
        System.out.println(num);
        System.out.println(ch);
        System.out.println(sum);
    }
}